package com.share.device.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.share.device.domain.Cabinet;
import com.share.device.domain.CabinetSlot;

import java.util.List;
import java.util.Map;

public interface ICabinetService extends IService<Cabinet> {
    //分页查询
    List<Cabinet> selectListCabinet(Cabinet cabinet);

    //未使用柜机
    List<Cabinet> searchNoUseList(String keyword);

    Cabinet getBtCabinetNo(String cabinetNo);

    Map<String, Object> getAllInfo(Long id);

    Cabinet getAllInfoByCabinetNo(String cabinetNo);

    void updateCabinetNo(String cabinetNo);

    Integer addCabinet(Cabinet cabinet);

    /**
     * 获取设备统计数据
     * @return Map包含以下数据：
     * totalCount: 设备总数
     * usageRate: 使用率（百分比）
     */
    Map<String, Object> getDeviceStatistics();

    Integer addSlot(CabinetSlot cabinet);
}
